<template>
	<view>
		<view v-for="(item,index) in videoList" :key="index">
			<view class="uni-padding-wrap">
				<page-head :title="item.newsTitle"></page-head>
				<view>
					<button type="primary" @click="gksp(item)">观看视频</button>
					<!-- <button type="primary" @click="gksp(item.newsCarouselPath)">观看视频</button> -->
<!-- 					<navigator :url="'temp_video?temp1=' + item.jmsp">
					</navigator> -->
					<!-- <video style="width: 100%;" :src="item.newsCarouselPath"
						 enable-danmu danmu-btn controls></video> -->
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '学院视频',
				videoList: []
			}
		},
		onLoad(options) {
			this.NewsList()
		},
		methods: {
			gksp(item){
				console.log(item)
				// uni.navigateTo({
				// 	url:'/pages/details/temp_video?temp1=' + newsCarouselPath
				// })
			},
			NewsList() {
				// http://www.hngsxy.com/mybatisplus/gsxyNews/selectNewsTypeIsImg
				//gsxyNewsList
				uni.request({
					url:'https://www.hngsxy.com/mybatisplus/gsxyNews/selectNewsTypeIsImg',
					data:{
						newType: '1'
					},
					success: (res) => {
						console.log(res.data)
						this.videoList = res.data
					},
					fail: (res) => {
						console.log("未知错误");
					}
				})
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>